﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace Kira.Compiler.Bods
{
    [XmlElementMapping("DIScriptFunction")]
    public class DIScriptFunction : BodsInvokable
    {

        public BodsDataType ReturnType
        {
            get { return (BodsDataType)Enum.Parse(typeof(BodsDataType), this.GetElement("DIFunctionReturn").GetAttrbuteValue("datatype"), true); }
        }

        public IEnumerable<BodsStep> Steps
        {
            get
            {
                return this.GetElement("DISteps").GetElements<BodsStep>();
            }
        }
    }
}
